package com.upcode.weighing.domain;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.upcode.weighing.base.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;


//组织机构
@Data
@EqualsAndHashCode(callSuper=false)
public class SysOrganization extends BaseEntity {
    private static final long serialVersionUID = 1L;
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;//组织机构ID
    private String code;//编码
    @JsonSerialize(using= ToStringSerializer.class)
    private Long pid;//父级ID
    private String name;//机构/部门/岗位名称
    private Integer type;//机构类型 1机构 2部门 3岗位
    private String address;//机构所在地-详细地址
    private Integer delStatus;//删除状态 0已删除  1未删除
    private Integer status;//机构状态 0已禁用  1开启
    private String linkName;//负责人
    private String linkPhone;//负责人联系电话
    private String roomPhone;//负责人办公座机电话
    private String des;//备注
    @JsonSerialize(using= ToStringSerializer.class)
    private Long createUserId;//添加人id
    private LocalDateTime createTime;//添加时间
    @JsonSerialize(using= ToStringSerializer.class)
    private Long lastUpdateUserId;//最后修改人id
    private LocalDateTime lastUpdateTime;//最后修时间
    private List<SysOrganization> childOrganization;//子菜单集合
}
